package com.dawn.usermanage.bean;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.dawn.idolmanage.bean.IdolInfoBean;
import com.dawn.trademanage.bean.TradeInfoBean;

/**
 * The persistent class for the tu_userinfo database table.
 * 
 */
@Entity
@Table(name = "tu_userinfo")
public class UserBean implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long userId;

	@Temporal(TemporalType.TIMESTAMP)
	private Calendar createTime;

	private int grade;

	@Temporal(TemporalType.TIMESTAMP)
	private Calendar lastLoginTime;

	private int memberType;

	private String others;

	private String password;

	private String userName;

	private String gender;

	private String province;
	private String city;

	private int followNum;
	private int creditLevel;
	private int remainNumByDay;

	// bi-directional many-to-one association to IdolinfoBean
	@OneToMany(mappedBy = "tuUserinfo")
	private Set<IdolInfoBean> tiIdolinfos;

	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "tradeId")
	private TradeInfoBean ttTradeinfo;

	// bi-directional one-to-one association to SinainfoBean
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "sinaId")
	private SinaInfoBean sinaInfoBean;

	public long getUserId() {
		return this.userId;
	}

	public void setUserId(long userId2) {
		this.userId = userId2;
	}

	public Calendar getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Calendar createTime) {
		this.createTime = createTime;
	}

	public int getGrade() {
		return this.grade;
	}

	public void setGrade(int grade) {
		this.grade = grade;
	}

	public Calendar getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(Calendar lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public int getMemberType() {
		return this.memberType;
	}

	public void setMemberType(int memberType) {
		this.memberType = memberType;
	}

	public String getOthers() {
		return this.others;
	}

	public void setOthers(String others) {
		this.others = others;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Set<IdolInfoBean> getTiIdolinfos() {
		return this.tiIdolinfos;
	}

	public void setTiIdolinfos(Set<IdolInfoBean> tiIdolinfos) {
		this.tiIdolinfos = tiIdolinfos;
	}

	public SinaInfoBean getSinaInfoBean() {
		return this.sinaInfoBean;
	}

	public void setSinaInfoBean(SinaInfoBean sinaInfoBean) {
		this.sinaInfoBean = sinaInfoBean;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public TradeInfoBean getTtTradeinfo() {
		return ttTradeinfo;
	}

	public void setTtTradeinfo(TradeInfoBean ttTradeinfo) {
		this.ttTradeinfo = ttTradeinfo;
	}

	public int getCreditLevel() {
		return creditLevel;
	}

	public void setCreditLevel(int creditLevel) {
		this.creditLevel = creditLevel;
	}

	public int getFollowNum() {
		return followNum;
	}

	public void setFollowNum(int followNum) {
		this.followNum = followNum;
	}

	public int getRemainNumByDay() {
		return remainNumByDay;
	}

	public void setRemainNumByDay(int remainNumByDay) {
		this.remainNumByDay = remainNumByDay;
	}

}
